#ifndef PIPELINE_SAMPLE_H
#define PIPELINE_SAMPLE_H
#include "SampleBase.h"
#include "glad\glad.h"
#include "glslprogram.h"
namespace ShaderLab {
	class PipelineSample : public SampleBase {
	public:
		PipelineSample();
		~PipelineSample();

		void Init();
		void Update(float time);
		void Render();
		void Imgui();
		void ShutDown();
	private:
		void SetUpVAO();
		void CreateShaderProgram();
		void link(GLuint);
		void checkLinkStatus(GLuint program);
		GLuint compileShader(const std::string& fName, GLenum shaderType);
		std::string loadShaderCode(const std::string& fName);
		std::string getShaderInfoLog(GLuint shader);
		std::string getProgramInfoLog(GLuint program);
	private:
		GLuint VAO;
		GLuint programs[3];
		GLuint pipelines[2];
		GLuint uniLocation;
	};
}
#endif // !TEMPLATE_SAMPLE_H
